% TEST_ID: LANG-EXPAND-0111
% CATEGORY: language/string
% 测试 string 的类型判断

function test_string_isstrprop()
chr = '123 Maple Street';
TF = isstrprop(chr,'alpha');
ret = [0   0   0   0   1   1   1   1   1   0   1   1   1   1   1   1];
assert(isequal(TF,ret));

TF = isstrprop(chr,'digit');
ret = [1   1   1   0   0   0   0   0   0   0   0   0   0   0   0   0];
assert(isequal(TF,ret));


str = {'123 Maple St.';'456 Oak St.'};
TF = isstrprop(str,'wspace');
ret = {[0 0 0 1 0 0 0 0 0 1 0 0 0]
        [    0 0 0 1 0 0 0 1 0 0 0]};
assert(isequal(TF,ret));

chr = 'A horse! A horse! My kingdom for a horse!';
TF = isstrprop(chr,'punct','ForceCellOutput',true);
ret = {[0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]};
assert(isequal(TF,ret));

X = [77 65 84 76 65 66];
TF = isstrprop(X,'alpha');
ret = [1 1 1 1 1 1];
assert(isequal(TF,ret));

assert(isstrprop('π','graphic'));
assert(isstrprop('θ','print'));